<?php

	if(!$_SESSION['user'] || !(unserialize($_SESSION['user']) instanceOf User))
	{
		$this->setGuiMode('ajax');
		header('Location: /blog/admin/login');
		return;
	}
	
	$posts = PostMapper::get()->findAllByDate();
	$this->view()->assign('posts', $posts);
	
	$this->addInclude('app/css/areas/admin/manage.css','css');

?>